package Demo2;

import java.util.*;

public class Test3 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        while (list.size()<10){
            int number = (int)(Math.random()*10);
            for (int i = 0; i < list.size(); i++) {
                if(number==list.get(i)){
                    number = (int)(Math.random()*10);
                    i=-1;
                 }
            }
            list.add(number);
        }
        Collections.sort(list);
        System.out.println(list);
        System.out.println("----------------------------------------");
        Set set = new HashSet();
        while (set.size()<10){
            int number = (int)(Math.random()*96)+70;
            set.add(number);
        }
        System.out.println(set);
    }



}

